﻿namespace JxcLite.Repositories;

class BillRepository
{
    internal static Task<string> GetMaxBillNoAsync(Database db, string prefix)
    {
        var sql = $"select max(BillNo) from JxBillHead where CompNo=@CompNo and BillNo like '{prefix}%'";
        return db.ScalarAsync<string>(sql, new { db.User.CompNo });
    }
}